<include file="Public:header" />
<div id="zoneHeader">
    <h2>编辑站长信息</h2>
    <ul>
        <li><a href="?c=Siter" class="btn">返回</a></li>
    </ul>
</div><!--/#zoneHeader-->
<div id="zoneBody" class="noFooter">
    <div id="zoneBodyContent">
        <form action="?c=Siter&a=doSave" id="formEdit">
            <input type="hidden" name="id" />
            <table border="0" cellpadding="0" cellspacing="0" class="table3">
                <tr>
                    <th colspan="4">会员账户信息</th>
                </tr>
                <tr>
                    <td width="10%" align="right">ID：</td>
                    <td width="40%"><span name="id"></span></td>
                    <td width="10%" align="right">账户余额：</td>
                    <td width="40%"><span name="money"></span></td>
                </tr>
                <tr>
                    <td align="right">会员名称：</td>
                    <td><span name="name"></span></td>
                    <td align="right"></td>
                    <td></td>
                </tr>
                <tr>
                    <td align="right">会员性质：</td>
                    <td>
                        <label><input type="radio" name="type" value="1" /><span>网站主</span></label>
                        <label><input type="radio" name="type" value="2" /><span>广告主</span></label>
                    </td>
                    <td align="right"></td>
                    <td></td>
                </tr>
                <tr>
                    <td align="right">会员状态：</td>
                    <td>
                        <select name="status">
                            <volist name=":C('USER_STATUS')" id="vo">
                            <option value="{$key}">{$vo}</option>
                            </volist>
                        </select>
                    </td>
                    <td align="right">QQ：</td>
                    <td> <input name="qq" type="text" /> </td>
                </tr>
                <tr>
                    <td align="right">客服专员：</td>
                    <td>
                        <select name="service_id">
                            <option value="0">请选择客服</option>
                            <volist name=":getAllSiterServiceList()" id="vo">
                            <option value="{$vo['id']}">{$vo['contact']}</option>
                            </volist>
                        </select>
                    </td>
                    <td align="right">E-mail：</td>
                    <td><input name="email" type="text" /></td>
                </tr>
                <tr>
                    <td align="right">联系电话：</td>
                    <td><input name="tel" type="text" /></td>
                    <td align="right">结算方式：</td>
                    <td><label>
                      <input type="radio" name="clearing" value="day" />
                      <span>日结</span></label>
                      <label>
                        <input type="radio" name="clearing" value="week" />
                        <span>周结</span></label>
                      <label>
                        <input type="radio" name="clearing" value="month" />
                    <span>月结</span></label></td>
                </tr>
                <tr>
                    <td align="right">提示问题：</td>
                    <td><input name="question" type="text" /></td>
                    <td align="right">回答问题：</td>
                    <td><input name="answer" type="text" /></td>
                </tr>
                <tr>
                    <td align="right">会员密码：</td>
                    <td>
                        <input name="password" type="text" />
                        <p>不修改密码请留空</p>
                    </td>
                    <td align="right">联系人：</td>
                    <td><input name="contact" type="text" /></td>
                </tr>
                <tr>
                  <td align="right">投放域名限制：</td>
                  <td>
                      <label><input type="radio" name="limit_ad_domain" value="1" /><span>只允许在已审核域名投放</span></label>
                      <label><input type="radio" name="limit_ad_domain" value="0" /><span>不限制投放域名</span></label>
                  </td>
                  <td align="right"></td>
                  <td></td>
                </tr>
                <tr>
                  <td align="right">&nbsp;</td>
                  <td>&nbsp;</td>
                  <td align="right"></td>
                  <td></td>
                </tr>
                <tr>
                    <th colspan="3">银行信息</th>
                    <th>会员扣量</th>
                </tr>
                <tr>
                    <td align="right">收款人：</td>
                    <td><input name="accountname" type="text" /></td>
                    <td colspan="2" rowspan="5" align="right">
<style>
#siter-deduct-contrainer {}
#siter-deduct-contrainer dl { overflow:auto; margin:5px 0; }
#siter-deduct-contrainer dt { float:left; width:10%; }
#siter-deduct-contrainer dt span { display:inline-block; padding:0 5px;}
#siter-deduct-contrainer dd { float:left; width:90%; }
#siter-deduct-contrainer ul { overflow:auto; }
#siter-deduct-contrainer li { float:left; width:25%; text-align:left; }
</style>
                        <div id="siter-deduct-contrainer">
                            <dl>
                                <dt>&nbsp;</dt>
                                <dd>
                                    <ul>
                                        <php>$planType = C('PLAN_TYPES');</php>
                                        <foreach name="planType" item="v">
                                        <li>{$v}</li>
                                        </foreach>
                                    </ul>
                                </dd>
                            </dl>

                            <php>$planDevice = C('PLAN_DEVICES');</php>
                            <foreach name="planDevice" key="deviceIndex" item="deviceName">
                            <dl>
                                <dt><span>{$deviceName}</span></dt>
                                <dd>
                                    <ul>
                                        <foreach name="planType" key="k" item="v">
                                        <li><input type="text" name="deduct_{$k}_{$deviceIndex}"></li>
                                        </foreach>
                                    </ul>
                                </dd>
                            </dl>
                            </foreach>
                        </div>

                    </td>
                </tr>
                <tr>
                    <td align="right">银行名称：</td>
                    <td>
                        <select name="bank" id="bank">
                            <volist name=":C('BANK')" id="vo">
                            <option value="{$key|strtolower}">{$vo}</option>
                            </volist>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align="right">银行账号：</td>
                    <td><input name="bankacc" type="text" /></td>
                </tr>
                <tr>
                    <td align="right">开户行名称：</td>
                    <td><input name="bankname" type="text" /></td>
                </tr>
                <tr>
                    <td align="right">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <th colspan="4">其他信息</th>
                </tr>
                <tr>
                    <td align="right">注册IP：</td>
                    <td><span name="create_ip"></span><span name="create_ip_addr" style="display:block"></span></td>
                    <td align="right">注册时间：</td>
                    <td><span name="create_time"></span></td>
                </tr>
                <tr>
                    <td align="right">最后登录IP：</td>
                    <td><span name="last_login_ip"></span><span name="last_login_ip_addr" style="display:block"></span></td>
                    <td align="right">最后登录时间：</td>
                    <td><span name="last_login_time"></span></td>
                </tr>
            </table>

            <ul class="btnList">
                <li><button type="submit" class="btnFormEditSave">保存</button></li>
                <li><a href="?c=Siter" class="btn">返回</a></li>
            </ul>
        </form>
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->
<script>
$(function(){
    <notempty name="record">
    var record = {$record|json_encode};
    record.money = {:getTotalMoney($record['daymoney'], $record['weekmoney'], $record['monthmoney'])};
    record.password = '';
    record.create_ip_addr = "{:get_location_ip($record['reg_ip'])}";
    <notempty name="record.last_login_ip">
    record.last_login_ip_addr = "{:get_location_ip($record['last_login_ip'])}";
    </notempty>

    new Form($('#formEdit'), new Model(record));
    </notempty>
})
</script>
<include file="Public:footer" />
